
Technical Q&A's
QTMTB 31 - Adding QuickTime Movie Data to Non-QuickTime Files (1-May-95)
Q Is there a way to embed a QuickTime movie into a Macintosh file
containing non-QuickTime material and have the Movie Toolbox play the movie
back correctly? If so, can we pass the same movie handle to QuickTime for
Windows and get it to play back the same data from the same file?
A To add QuickTime movie data to non-QuickTime files, store the movie data in the
file using FlattenMovieData with the flattenAddMovieToDataFork flag. Since
FlattenMovieData simply appends to a data fork of a file, it appends the movie
data to any data file you pass to it. The data stored before or after the movie
data doesn't matter to QuickTime, as long as you don't reposition the movie
data within the data file. If you do, the movie references are no longer
correct, since they aren't updated when you edit the file. The returned movie
(from FlattenMovieData) resolves properly to that data file. You can then save
the movie in the data fork with PutMovieIntoDataFork, or in the resource fork
with AddMovieResource. If the movie is saved in the data fork, you can retrieve
it with NewMovieFromDataFork for both QuickTime and QuickTime for Windows.
It is possible to store multiple movies simply by calling FlattenMovieData and
PutMovieIntoDataFork several times on the same file. Each FlattenMovieData call
appends new data, assuming the createMovieFileDataCurFile flag isn't set.
For more information, see "Cross-Platform Compatibility and Multiple-Movie
Files" in develop #17.
Technical Support
Technical Q&As
Previous Question | Contents | Next Question

Main |
Page One |
What's New |
Apple Computer, Inc. |
Find It |
Contact Us |
Help